//
//  TIMMessageBaseCell.h
//  Demo_sdk
//
//  Created by Deli Xia on 2018/6/29.
//  Copyright © 2018年 Deli Xia. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "TIMMessage.h"
#import "TIMCustomMenu.h"

@protocol TIMMessageViewCellDelegate <NSObject>

@optional
- (void)messageCellLongPress:(TIMMessage *)message rect:(CGRect)rect; // 长按消息

- (void)messageCellTap:(TIMMessage *)message;

@end

@interface TIMMessageBaseCell : UITableViewCell

@property (nonatomic, strong) UILabel *timeLabel;

@property (nonatomic, strong) UIButton *avatarButton;

@property (nonatomic, strong) UILabel *usernameLabel;

@property (nonatomic, strong) UIImageView *messageBackgroundView;

@property (nonatomic, strong) TIMMessage *message;
// 菊花视图所在的view
@property (nonatomic, strong) UIActivityIndicatorView *activityView;
// 重新发送
@property (nonatomic, strong) UIButton *retryButton;

@property (nonatomic, strong) TIMCustomMenu *menuView;

@property (nonatomic, weak) id<TIMMessageViewCellDelegate> delegate;
/**
 *  更新消息，如果子类不重写，默认调用setMessage方法
 */
- (void)updateMessage:(TIMMessage *)message;

@end
